package com.asset.dispoal.business.approval.domain.db.mapper;

import com.asset.dispoal.business.approval.domain.db.entity.RepaymentApprover;
import com.asset.dispoal.business.approval.domain.db.qo.GetRepaymentApprovalListQo;
import com.asset.dispoal.business.approval.dto.ApproverListResponse;
import com.asset.dispoal.business.approval.dto.GetApproverRequest;
import com.asset.dispoal.business.approval.dto.RepaymentApprovalResponse;
import org.apache.ibatis.annotations.Mapper;
import tech.mhuang.pacebox.springboot.protocol.data.Page;

import java.util.List;

/**
 * @description:
 * @author: yf
 * @date: 2022-10-09 09:50:59
 */
@Mapper
public interface RepaymentApproverMapper {
    /**
     * 根据机构种类批次id获取数据
     *
     * @param assetInstBatchId
     * @return
     */
    RepaymentApprover queryByassetInstBatchId(String assetInstBatchId);

    /**
     * 数据更新
     *
     * @param repaymentApprover
     * @return
     */
    int update(RepaymentApprover repaymentApprover);

    /**
     * 单条信息插入
     *
     * @param repaymentApprover
     * @return
     */
    int insert(RepaymentApprover repaymentApprover);

    /**
     * 条件查询列表条数
     *
     * @param qo
     * @return
     */
    int countByQo(GetRepaymentApprovalListQo qo);

    /**
     * 条件查询列表
     *
     * @param page
     * @return
     */
    List<RepaymentApprovalResponse> queryApprovalList(Page page);

    /**
     * 获取审核人数量
     *
     * @param request
     * @return
     */
    int getUserCount(GetApproverRequest request);

    /**
     * 获取审核人信息
     *
     * @param page
     * @return
     */
    List<ApproverListResponse> getApproverInfo(Page page);

    /**
     * 条件查询我的还款列表数量
     *
     * @param approvalListQo
     * @return
     */
    int countMyReapaymentListByQo(GetRepaymentApprovalListQo approvalListQo);

    /**
     * 条件获取我的还款列表
     *
     * @param page
     * @return
     */
    List<RepaymentApprovalResponse> queryMyRepaymentList(Page page);
}
